<?php
/*
 * This file is part of SoftSite.
 *
 * (c) 2012 Steve Tredinnick
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 *
 *
 * @package softsite
 * @author  Steve Tredinnick <steve.tredinnick@gmail.com>
 */

namespace Lib\Forms\Elements;

use Lib\Forms\BaseElement;

if(!defined('IN_APP'))
{
    Die("Direct Access to PHP Scripts is not permitted");
}

class FieldSetElement extends BaseElement
{

    private $disabled="";
    private $name="";
    private $legend="";


    public function RenderElement()
    {
        return $this->formHtml;
    }

    Public Function OpenFieldSet()
    {
        $this->formHtml .="<fieldset";
        $this->formHtml .=$this->name;
        $this->formHtml .=$this->disabled;
        $this->formHtml .=">";
        $this->formHtml .=$this->legend;

    }

    public function CloseFieldSet()
    {
        $this->formHtml .="</fieldset>";
    }

    public function SetName($name)
    {
        $this->name = " name='".$name."' ";
    }

    public function SetLegend($legend)
    {
        $this->legend = "<Legend>".$legend."</Legend>";
    }

    public function SetDisabled()
    {
        $this->disabled = " disabled ";
    }

}
